<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.daoshu</groupId>
        <artifactId>mti-parent</artifactId>
        <version>3.0.0-RELEASE</version>
    </parent>
    <groupId>com.daoshu</groupId>
    <artifactId>${cfg.projectName}</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>${cfg.projectName}</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>1.8</java.version>
        <swagger.version>2.9.2</swagger.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <!-- 服务注册 -->
        <dependency>
            <groupId>com.daoshu</groupId>
            <artifactId>registrar-spring-boot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>com.daoshu</groupId>
            <artifactId>mti-core-framework</artifactId>
        </dependency>
    </dependencies>

    <!-- 设置 jitpack.io 插件仓库 -->
    <pluginRepositories>
        <pluginRepository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </pluginRepository>
        <pluginRepository>
            <id>maven-public</id>
            <url>http://10.168.4.75:8081/repository/maven-public/</url>
        </pluginRepository>
    </pluginRepositories>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>
                    1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <mainClass>${cfg.packageName}.Application</mainClass>
                        </manifest>
                        <!-- 打包后不包括pom的描述文件 -->
                        <addMavenDescriptor>false</addMavenDescriptor>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>2.1.5.RELEASE</version>
                <configuration>
                    <includeSystemScope>true</includeSystemScope>
                    <classifier>exec</classifier>
                    <mainClass>${cfg.packageName}.Application</mainClass>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
